<template>
  <div class="recommend">
    <div v-for="item in recommend" :key="item.image"  class="recommend_img">    
      <a :href="item.link">
        <img :src="item.image" alt="" @load="recommendImgLoad">
      </a>      
      <div class="recommend_text">{{item.title}}</div>
    </div>
  </div>
</template>

<script>
export default {
  name: "Home_recommend",
  props: {
    recommend: {
      type: Array,
      default(){
        return [];
      }
    }
  },
  methods: {
    recommendImgLoad(){
      this.$bus.$emit("rImgLoad");
    }
  }
}
</script>

<style scoped>
  .recommend{
    width: 100%;
    display: flex;
    text-align: center;
    padding-bottom: 8px;
    box-shadow: 0px 10px 0px rgba(100,100,100,0.1);
  }

  .recommend_img{
    flex: 1;
    font-size: 14px;
  }

  .recommend_img img{
    margin-top: 10px;
    width: 65px;
    height: 65px;
    margin-bottom: 10px;
  }
</style>